<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;


/**
 * App\Models\PostImage
 *
 * @property int $id
 * @property int $aid 数据ID
 * @property int $uid
 * @property string $image
 * @property string $thumb
 * @property int $isremote
 * @property string $description
 * @property int $displayorder
 * @property-read \App\Models\PostItem $post
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PostImage whereAid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PostImage whereDescription($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PostImage whereDisplayorder($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PostImage whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PostImage whereImage($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PostImage whereIsremote($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PostImage whereThumb($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PostImage whereUid($value)
 * @mixin \Eloquent
 */
class PostImage extends Model
{
    protected $table = 'post_image';
    protected $primaryKey = 'id';
    protected $guarded = ['id'];

    public $timestamps = false;

    public function post()
    {
        return $this->belongsTo(PostItem::class, 'aid', 'aid');
    }
}
